﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewOpportunities.aspx.cs" Inherits="services_ViewOpportunities" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="obout_Grid_NET" Namespace="Obout.Grid" TagPrefix="cc1" %>
<%@ Register TagPrefix="cc1" Namespace="Obout.Interface" Assembly="obout_Interface" %>
<%@ Register TagPrefix="oem" Namespace="OboutInc.EasyMenu_Pro" Assembly="obout_EasyMenu_Pro" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Flyout2" Assembly="obout_Flyout2_NET"%>
<%@ Register src="../header.ascx" tagname="header" tagprefix="uc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Oportunidades</title>    
    <link href="../style/Style.css" rel="stylesheet" type="text/css" />
    <link href="../style/axesat.css" rel="stylesheet" type="text/css" />
    <link href="css/axesat.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="../js/jquery-1.2.6.pack.js"></script>

   
		<script type="text/javascript">
		    function exportToExcel() {
		        Grid1.exportToExcel();
		    }

		    function asignarColumnaSeleccionada(nombreColumna) {
		        document.getElementById('hdnColumnaSeleccionada').value = nombreColumna;
		    }

		    function nodoSeleccionado(idNodo) {
		        document.getElementById('hdnPostBackTree').value = '1';
		        document.getElementById('hdnNodoSeleccionado').value = idNodo;
		        document.forms[0].submit();
		    }

		    function rightClick(e) {		        
		        if (e.target)
		            document.getElementById('hdnRightClickSeleccionado').value = e.target.id;
		        else
		            document.getElementById('hdnRightClickSeleccionado').value = e.srcElement.id;
		        
		        // para parar la propagacion del evento en gecko
		        if (e.stopPropagation) {
		            e.preventDefault();
		            e.stopPropagation();
		        }
		        return false;
		    }
		    
		    

		    window.onload = function() {
		    html_el = document.getElementsByTagName('html').item(0);
		    if (window.attachEvent)
		        html_el.attachEvent('oncontextmenu', rightClick);
		    else if (window.addEventListener)
		        html_el.addEventListener('contextmenu', rightClick, false);		    
		    }

		    function CursorMano(contenedor) {
		        contenedor.style.cursor = 'hand';
		        contenedor.style.cursor = 'pointer';
		    }        

		</script>					   
</head>
<body style="margin-left: 0px;" oncontextmenu="return false;">

    <form id="form1" runat="server">
      <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />
    <div>
    
    <table width="95%">
    <tr>
        <td colspan="2">            
            <uc1:header ID="header1" runat="server" />
        </td>
    </tr>
    </table>
    
    <div id="content">
        <div class="tit_content">Gestión de Oportunidades</div>
        <div id="bar_nav2">
            <div class="menusupe">
                <ul>
                    <li class="overmenu"><a href="#">Consulta Oportunidades</a></li>
                </ul>
            </div>         
        </div>
    
    <!--menu-->
    <div id="menu_lateral">
       <asp:Panel ID="pnlTree" runat="server" CssClass="frameText" Height="135px" 
            Width="465px">
       <ASP:Literal id="trvClient" runat="server" />
       
        <center>
        <table runat="server" id="tblError" width="180px"><tr><td><asp:Image ID="imgNoFound" runat="server" ImageUrl="../images/noFound.jpg"/></td></tr>
        <tr><td >                 <div class="messageEmpty" style="height:35px" >No existen Clientes Asociados.</div></td></tr></table>
           </center>
                </asp:Panel>
        </div>                
    <!--menu-->    
    <table>
        <tr>
        <td>
    <div id="btn_crear">        
        <asp:ImageButton ID="btnCrearOportunidad" runat="server" 
        ImageUrl="../images/btn_crearCaso.jpg" onclick="btnCrearOportunidad_Click" />
    </div>              
<div id="btn_descarga">

        <img id="img1" alt="Exportar a excel" src="../images/btn_descargal.jpg" onclick="exportToExcel();return false;" style="cursor:pointer;" />
</div>              
        </td>
        </tr>
        <tr>
            <td>
<div style="float:left; margin:10px 0 0 0; margin-left:10px; display:block;">    
    <table background="../images/fondoFlyout.jpg" style="border: 1px solid Gray; background-repeat:repeat; z-index:100; ">
    <tr>
    <td>    
        Buscar:<asp:TextBox ID="txtSearchVisible" runat="server" Text=""></asp:TextBox>    
    </td>
    <td>             
        <asp:ImageButton ID="btnSearchVisible" ImageUrl="../images/view.gif" runat="server" 
            onclick="btnSearchVisible_Click" />        
        </td>
    </tr>    

    </table>    
</div>
            
            </td>
        </tr>
    </table>


<div id="tabla"> 
        
        <asp:HiddenField ID="hdnColumnaSeleccionada" runat="server" />
        <asp:HiddenField ID="hdnNodoSeleccionado" runat="server" />
        <asp:HiddenField ID="hdnRightClickSeleccionado" runat="server" />
        <asp:HiddenField ID="hdnPostBackTree" runat="server" Value="0" />    
        <asp:HiddenField ID="hdnNIT" runat="server" />
        <asp:HiddenField ID="hdnIdCuenta" runat="server" />
    
                <cc1:Grid ID="Grid1" runat="server" FolderStyle="styles/black_glass" AutoGenerateColumns="False" 
                    Serialize="false"
                    EnableTypeValidation="false" AllowAddingRecords="false" 
                    AllowFiltering="false" AllowSorting="false"
                    PageSize="6" AllowPageSizeSelection="false"
                    CallbackMode="true" GenerateRecordIds="true" 
                    AllowMultiRecordSelection="true" Width="950px" >                    
                    <Columns>
                    <cc1:Column ID="Column4" DataField="id_oportunidad" runat="server" HeaderAlign="left" Width="20%">
                        <TemplateSettings HeaderTemplateID="TemplateHeaderIdOportunidad" />
                    </cc1:Column>
                    <cc1:Column ID="Column5" DataField="nombre_oportunidad" runat="server" HeaderAlign="left" Wrap="true" Width="30%">                        
                        <TemplateSettings HeaderTemplateID="TemplateHeaderNombreOportunidad" />
                    </cc1:Column>                                        
                    <cc1:Column ID="Column2" DataField="etapa" HeaderText="Etapa" runat="server" HeaderAlign="left" Wrap="true" Width="20%">
                        <TemplateSettings HeaderTemplateID="TemplateHeaderEtapa" />
                    </cc1:Column>
                    <cc1:Column ID="Column6" DataField="ancho_banda" HeaderText="" runat="server" HeaderAlign="left" Width="10%">                    
                        <TemplateSettings HeaderTemplateID="TemplateHeaderAnchoBanda" />
                    </cc1:Column>
                    <cc1:Column ID="Column3" DataField="nombre_proyecto" HeaderText="" runat="server" HeaderAlign="left" Wrap="true" Width="20%">
                        <TemplateSettings HeaderTemplateID="TemplateHeaderNombreProyecto" />
                    </cc1:Column>
                    <cc1:Column ID="Column7" DataField="id_oportunidadSF" runat="server" Visible="false">                        
                    </cc1:Column>
                    </Columns>
                    
                    <ExportingSettings ExportDetails="True" />                    

                    <TemplateSettings RowEditTemplateId="tplRowEdit" />
                    <LocalizationSettings AddLink="Nuevo" CancelAllLink="Cancelar todo" 
                        CancelLink="Cancelar" DeleteLink="Eliminar" EditLink="Editar" 
                        Filter_ApplyLink="Aplicar Filtro" Filter_HideLink="Ocultar filtro" 
                        Filter_RemoveLink="Quitar filtro" Filter_ShowLink="Mostrar filtro" 
                        FilterCriteria_Contains="Contiene" FilterCriteria_DoesNotContain="No contiene" 
                        FilterCriteria_EndsWith="Termina con" FilterCriteria_EqualTo="Igual a" 
                        FilterCriteria_GreaterThan="Mayor a" 
                        FilterCriteria_GreaterThanOrEqualTo="Mayor o igual a" 
                        FilterCriteria_IsEmpty="Vacio" FilterCriteria_IsNotEmpty="No vacio" 
                        FilterCriteria_IsNotNull="No nulo" FilterCriteria_IsNull="Nulo" 
                        FilterCriteria_NoFilter="Sin filtro" FilterCriteria_NotEqualTo="Diferente a" 
                        FilterCriteria_SmallerThan="Menor que" 
                        FilterCriteria_SmallerThanOrEqualTo="Menor o igual a" 
                        FilterCriteria_StartsWith="Comienza con" 
                        Grouping_GroupInformationNextPage=" (Mostrando XXXXX de YYYYY registros - This group is continued on the next page)" 
                        Grouping_GroupInformationPreviousNextPage=" (Mostrando XXXXX de YYYYY registros - This group was started on the previous page and continues on the next page)" 
                        Grouping_GroupInformationPreviousPage=" (Mostrando XXXXX de YYYYY registros - This group was started on the previous page)" 
                        LoadingText="Cargando..." ModifyLink="Modificar" 
                        NoRecordsText="NO SE ENCONTRARON REGISTROS" 
                        Paging_ManualPagingLink="Ir a la pagina »" Paging_OfText="de" 
                        Paging_PageSizeText="Registros por pagina" Paging_PagesText="Paginas:" 
                        Paging_RecordsText="Registros:" RemoveLink="Quitar" SaveAllLink="Guardar todo" 
                        SaveLink="Guardar" UpdateLink="Actualizar" />
                    <Templates>
                        <cc1:GridTemplate runat="server" ID="TemplateHeaderIdOportunidad">
                            <Template>                            
                                <div id="divHeaderFlyout1" onclick="asignarColumnaSeleccionada('id_oportunidad'); <%=Flyout1.getClientID()%>.AttachTo('divHeaderFlyout1'); <%=Flyout1.getClientID()%>.Open();">Id<br />Oportunidad</div>
                            </Template>
                        </cc1:GridTemplate>                            
                        <cc1:GridTemplate runat="server" ID="TemplateHeaderNombreOportunidad">                        
                            <Template>
                                <div id="divHeaderFlyout2" onclick="asignarColumnaSeleccionada('nombre_oportunidad');<%=Flyout1.getClientID()%>.AttachTo('divHeaderFlyout2'); <%=Flyout1.getClientID()%>.Open();">Nombre<br />oportunidad</div>
                            </Template>
                        </cc1:GridTemplate>                                                    
                        <cc1:GridTemplate runat="server" ID="TemplateHeaderEtapa">                        
                            <Template>
                                <div id="divHeaderFlyout3" onclick="asignarColumnaSeleccionada('etapa'); <%=Flyout1.getClientID()%>.AttachTo('divHeaderFlyout3'); <%=Flyout1.getClientID()%>.Open();">Etapa</div>
                            </Template>
                        </cc1:GridTemplate>                                                                            
                        <cc1:GridTemplate runat="server" ID="TemplateHeaderAnchoBanda">
                            <Template>
                                <div id="divHeaderFlyout4" onclick="asignarColumnaSeleccionada('ancho_banda'); <%=Flyout1.getClientID()%>.AttachTo('divHeaderFlyout4'); <%=Flyout1.getClientID()%>.Open();">Ancho<br />banda</div>
                            </Template>
                        </cc1:GridTemplate>                                                                                                    
                        <cc1:GridTemplate runat="server" ID="TemplateHeaderNombreProyecto">
                            <Template>
                                <div id="divHeaderFlyout5" onclick="asignarColumnaSeleccionada('nombre_proyecto'); <%=Flyout1.getClientID()%>.AttachTo('divHeaderFlyout5');  <%=Flyout1.getClientID()%>.Open();">Nombre<br />Proyecto</div>
                            </Template>
                        </cc1:GridTemplate>                        
                    </Templates>

                </cc1:Grid>                               
</div>        
        
    
    </div>
    </div>
    
<obout:Flyout runat="server" ID="Flyout1" OpenEvent="NONE" CloseEvent="NONE" Position="BOTTOM_RIGHT">
<div id="menu2">
<img src="../images/close.jpg" border="0" alt="Cerrar filtros" onclick="<%=Flyout1.getClientID()%>.Close();" style="float:right" />
<asp:LinkButton ID="lnkAscendente" runat="server" onclick="lnkAscendente_Click">Ordenar A - Z</asp:LinkButton><br />
<asp:LinkButton ID="lnkDescendente" runat="server" onclick="lnkDescendente_Click">Ordenar Z - A</asp:LinkButton><br /><br />
<hr/>
<div style="margin:4px 0 0 0; padding:0; float:left; width:140px">
  <a>Contiene</a></div>
  <div style="margin:4px 0 0 0; padding:0; float:left; width:140px">
  <asp:TextBox ID="txtContiene" runat="server" Width="90px"></asp:TextBox>&nbsp;<asp:ImageButton ID="btnBuscarGrilla" runat="server" ImageUrl="../images/view.gif" onclick="btnBuscarGrilla_Click" />
                </div>
  <div style="margin:4px 0 0 0; padding:0; float:left; width:140px">
  </div>
   <br /><br /> 
</div>
    
</obout:Flyout>			
    
<obout:Flyout runat="server" ID="Flyout2">
    <table background="../images/fondoFlyout.jpg" style="border: 1px solid Gray; background-repeat:repeat; z-index:100; ">
    <tr>
    <td>    
        <asp:TextBox ID="txtSearch" runat="server" Text=""></asp:TextBox>    
    </td>
    <td>             
        <asp:ImageButton ID="btnSearch" ImageUrl="../images/view.gif" runat="server" 
            onclick="btnSearch_Click" />        
        </td>
    </tr>    

    </table>
</obout:Flyout>    

    </form>
</body>
</html>

<style type="text/css">
    .ob_gNRM
    {
    	/*Para hacer mas grande el texto de no se encotnraron registros*/
        font-size:12px;
        font-weight:bold;
        
    }
</style>
